Resource URL: /platform/<<version=1>>/auth/mapping/identities/<SOURCE>

    Overview: This resource provides external interface to the idmap.

     Methods: GET, POST, DELETE

********************************************************************************

Method GET: Retrieve all identity mappings (uid, gid, sid, and on-disk) for the
            supplied source persona.

       URL: GET /platform/<<version=1>>/auth/mapping/identities/<SOURCE>

Query arguments:
nocreate=<boolean> Idmap should attempt to create missing identity mappings.
     zone=<string> Optional zone.

GET response body schema:
{
  "type": "object", 
  "properties": {
    "identities": {
      "items": {
        "type": "object", 
        "description": "Specifies properties for the identity mapping entry.", 
        "properties": {
          "source": {
            "required": true, 
            "type": [
              {
                "type": "object", 
                "description": "Specifies properties for a persona, which consists of either a 'type' and a 'name' or an 'ID'.", 
                "properties": {
                  "type": {
                    "enum": [
                      "user", 
                      "group", 
                      "wellknown"
                    ], 
                    "type": "string", 
                    "description": "Specifies the type of persona, which must be combined with a name."
                  }, 
                  "id": {
                    "type": "string", 
                    "description": "Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'."
                  }, 
                  "name": {
                    "type": "string", 
                    "description": "Specifies the persona name, which must be combined with a type."
                  }
                }
              }
            ], 
            "description": "Specifies the source identity."
          }, 
          "id": {
            "required": true, 
            "type": "string", 
            "description": "Specifies the identity mapping entry id."
          }, 
          "targets": {
            "items": {
              "type": "object", 
              "description": "Specifies the target identity mappings.", 
              "properties": {
                "on_disk": {
                  "required": false, 
                  "type": "boolean", 
                  "description": "If true, the identity is preferred on-disk."
                }, 
                "type": {
                  "enum": [
                    "auto", 
                    "external", 
                    "manual"
                  ], 
                  "type": "string", 
                  "description": "Specifies the origin of the identity mapping.", 
                  "required": false
                }, 
                "target": {
                  "required": true, 
                  "type": [
                    {
                      "type": "object", 
                      "description": "Specifies properties for a persona, which consists of either a 'type' and a 'name' or an 'ID'.", 
                      "properties": {
                        "type": {
                          "enum": [
                            "user", 
                            "group", 
                            "wellknown"
                          ], 
                          "type": "string", 
                          "description": "Specifies the type of persona, which must be combined with a name."
                        }, 
                        "id": {
                          "type": "string", 
                          "description": "Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'."
                        }, 
                        "name": {
                          "type": "string", 
                          "description": "Specifies the persona name, which must be combined with a type."
                        }
                      }
                    }
                  ], 
                  "description": "Specifies the target identity."
                }
              }
            }, 
            "required": true, 
            "type": "array"
          }
        }
      }, 
      "type": "array"
    }
  }
}

********************************************************************************

Method POST: Manually set or modify a mapping between two personae.

        URL: POST /platform/<<version=1>>/auth/mapping/identities/<SOURCE>

Query arguments:
  type=<enum> Where <enum> is one of uid, gid, sid.  Desired mapping target to
              fetch/generate.
zone=<string> Optional zone.

POST request body schema:
{
  "type": [
    "null", 
    "object"
  ], 
  "description": "Null or any empty JSON object.", 
  "properties": {}
}

POST response body schema:
{
  "type": "object", 
  "properties": {
    "identities": {
      "items": {
        "type": "object", 
        "description": "Specifies properties for the identity mapping entry.", 
        "properties": {
          "source": {
            "required": true, 
            "type": [
              {
                "type": "object", 
                "description": "Specifies properties for a persona, which consists of either a 'type' and a 'name' or an 'ID'.", 
                "properties": {
                  "type": {
                    "enum": [
                      "user", 
                      "group", 
                      "wellknown"
                    ], 
                    "type": "string", 
                    "description": "Specifies the type of persona, which must be combined with a name."
                  }, 
                  "id": {
                    "type": "string", 
                    "description": "Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'."
                  }, 
                  "name": {
                    "type": "string", 
                    "description": "Specifies the persona name, which must be combined with a type."
                  }
                }
              }
            ], 
            "description": "Specifies the source identity."
          }, 
          "id": {
            "required": true, 
            "type": "string", 
            "description": "Specifies the identity mapping entry id."
          }, 
          "targets": {
            "items": {
              "type": "object", 
              "description": "Specifies the target identity mappings.", 
              "properties": {
                "on_disk": {
                  "required": false, 
                  "type": "boolean", 
                  "description": "If true, the identity is preferred on-disk."
                }, 
                "type": {
                  "enum": [
                    "auto", 
                    "external", 
                    "manual"
                  ], 
                  "type": "string", 
                  "description": "Specifies the origin of the identity mapping.", 
                  "required": false
                }, 
                "target": {
                  "required": true, 
                  "type": [
                    {
                      "type": "object", 
                      "description": "Specifies properties for a persona, which consists of either a 'type' and a 'name' or an 'ID'.", 
                      "properties": {
                        "type": {
                          "enum": [
                            "user", 
                            "group", 
                            "wellknown"
                          ], 
                          "type": "string", 
                          "description": "Specifies the type of persona, which must be combined with a name."
                        }, 
                        "id": {
                          "type": "string", 
                          "description": "Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'."
                        }, 
                        "name": {
                          "type": "string", 
                          "description": "Specifies the persona name, which must be combined with a type."
                        }
                      }
                    }
                  ], 
                  "description": "Specifies the target identity."
                }
              }
            }, 
            "required": true, 
            "type": "array"
          }
        }
      }, 
      "type": "array"
    }
  }
}

********************************************************************************

Method DELETE: Flush the entire idmap cache.

          URL: DELETE /platform/<<version=1>>/auth/mapping/identities/<SOURCE>

Query arguments:
  2way=<boolean> Delete the bi-directional mapping from source to target and
                 target to source.
 target=<string> Target identity persona.
   zone=<string> Optional zone.
remove=<boolean> Delete mapping instead of flush mapping from cache.

There is no response body for this method.
